﻿using System;
using System.Collections.Generic;

namespace MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;

/// <summary>
/// 商品表
/// </summary>
public partial class Good
{
    /// <summary>
    /// r,u,d-编号
    /// </summary>
    public int GId { get; set; }

    /// <summary>
    /// c,r-供应商(引用suppliers)
    /// </summary>
    public int GSupplierId { get; set; }

    /// <summary>
    /// c,r-商品类别（引用dictionarys）
    /// </summary>
    public int GGoodTypeId { get; set; }

    /// <summary>
    /// c,r,u,k-商品名称
    /// </summary>
    public string GName { get; set; } = null!;

    /// <summary>
    /// c,r,u-商品价格
    /// </summary>
    public decimal GPrice { get; set; }

    /// <summary>
    /// c,r,u-产品描述
    /// </summary>
    public string GDescription { get; set; } = null!;

    /// <summary>
    /// c,r,u-封面图片
    /// </summary>
    public string GPhoto { get; set; } = null!;

    /// <summary>
    /// c,r,u-详情图片
    /// </summary>
    public string GDetailImages { get; set; } = null!;

    /// <summary>
    /// c,r,u-商品规格
    /// </summary>
    public string GSpecs { get; set; } = null!;

    /// <summary>
    /// c,r,u-是否直营
    /// </summary>
    public int GIsDirectly { get; set; }

    /// <summary>
    /// r,u-是否上架
    /// </summary>
    public int GIsShelve { get; set; }

    /// <summary>
    /// r,u-库存
    /// </summary>
    public int GInventory { get; set; }

    /// <summary>
    /// c,r,u-生产日期
    /// </summary>
    public DateTime GBirthday { get; set; }

    /// <summary>
    /// c,r,u-保质期
    /// </summary>
    public int GExpiryday { get; set; }

    /// <summary>
    /// r,u-是否促销(废弃)
    /// </summary>
    public int GIsPromote { get; set; }

    /// <summary>
    /// r,u-置顶级别（越大的排在越前面）
    /// </summary>
    public int GTopLevel { get; set; }

    /// <summary>
    /// r-创建时间
    /// </summary>
    public DateTime GCreateTime { get; set; }

    /// <summary>
    /// r-修改时间
    /// </summary>
    public DateTime? GUpdateTime { get; set; }

    public virtual ICollection<Chart> Charts { get; set; } = new List<Chart>();

    public virtual ICollection<Collection> Collections { get; set; } = new List<Collection>();

    public virtual ICollection<Comment> Comments { get; set; } = new List<Comment>();

    public virtual Dictionary GGoodType { get; set; } = null!;

    public virtual Supplier GSupplier { get; set; } = null!;

    public virtual ICollection<History> Histories { get; set; } = new List<History>();

    public virtual ICollection<OrderDetail> OrderDetails { get; set; } = new List<OrderDetail>();

    public virtual ICollection<Promotion> Promotions { get; set; } = new List<Promotion>();
}
